package com.gitee.freakchicken.dbapi.conf;

import com.gitee.freakchicken.dbapi.basic.filter.C_bv967S5S;
import com.gitee.freakchicken.dbapi.basic.filter.C_YIuiRgs0;
import com.gitee.freakchicken.dbapi.basic.filter.C_HvREpheq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class C_G612Vitj {

    @Value("${dbapi.api.context}")
    private String gf_hSQgsKvr;

    @Autowired
    private C_HvREpheq gf_L7Sd1hhL;

    @Autowired
    private C_bv967S5S gf_kVfgEuOr;

    @Bean
    public FilterRegistrationBean m_DIFN9ij6() {
        int lf_fyC567N7 = 1;
        String lf_6z8rYgsj = String.format("/%s/*", gf_hSQgsKvr);
        FilterRegistrationBean lf_rAHYxG6U = new FilterRegistrationBean();
        lf_rAHYxG6U.setFilter(new C_YIuiRgs0());
        lf_rAHYxG6U.addUrlPatterns(lf_6z8rYgsj);
        lf_rAHYxG6U.addUrlPatterns("/token/generate");
        lf_rAHYxG6U.setOrder(lf_fyC567N7);
        lf_rAHYxG6U.setEnabled(true);
        log.info("regist apiHeaderFilter for {} UrlPatterns, and order is {}", lf_6z8rYgsj, lf_fyC567N7);
        return lf_rAHYxG6U;
    }

    @Bean
    public FilterRegistrationBean m_rPer09cB() {
        int lf_UB0how0p = 2;
        String lf_WGQ7VhKl = String.format("/%s/*", gf_hSQgsKvr);
        FilterRegistrationBean lf_iDzlcbw0 = new FilterRegistrationBean();
        lf_iDzlcbw0.setFilter(gf_L7Sd1hhL);
        lf_iDzlcbw0.addUrlPatterns(lf_WGQ7VhKl);
        lf_iDzlcbw0.setOrder(lf_UB0how0p);
        lf_iDzlcbw0.setEnabled(true);
        log.info("regist ipFilter for {} UrlPatterns, and order is {}", lf_WGQ7VhKl, lf_UB0how0p);
        return lf_iDzlcbw0;
    }

    @Bean
    public FilterRegistrationBean m_SvDiPjQ9() {
        int lf_M7mHjxxU = 3;
        String lf_SMY8WjNr = String.format("/%s/*", gf_hSQgsKvr);
        FilterRegistrationBean lf_KAAylZBa = new FilterRegistrationBean();
        lf_KAAylZBa.setFilter(gf_kVfgEuOr);
        lf_KAAylZBa.addUrlPatterns(lf_SMY8WjNr);
        lf_KAAylZBa.setOrder(lf_M7mHjxxU);
        lf_KAAylZBa.setEnabled(true);
        log.info("regist authFilter for {} UrlPatterns, and order is {}", lf_SMY8WjNr, lf_M7mHjxxU);
        return lf_KAAylZBa;
    }
}
